home *** CD-ROM | disk | FTP | other *** search
- function searchForWord()
- {
- explain.scroll = 0;
- word = search.toUpperCase();
- var _loc1_ = 0;
- while(_loc1_ < listAmount)
- {
- testword = listItems[_loc1_][0].slice(0,word.length);
- if(word == testword.toUpperCase())
- {
- found = true;
- location = _loc1_;
- displayExplanation(location);
- break;
- }
- found = false;
- _loc1_ = _loc1_ + 1;
- }
- if(found == false)
- {
- explain = "!! Word not Found !!\r\r--See list for closest matches--";
- }
- }
- function displayExplanation(index)
- {
- var _loc1_ = index;
- temp_explain = listItems[_loc1_][1];
- trace(temp_explain.length);
- explain = listItems[_loc1_][1];
- showIndex = _loc1_;
- updateListField(showIndex);
- }
- function updateListField(value)
- {
- var _loc1_ = value;
- if(_loc1_ > listAmount - 8)
- {
- _loc1_ = listAmount - 8;
- }
- list1 = listItems[_loc1_][0];
- list2 = listItems[_loc1_ + 1][0];
- list3 = listItems[_loc1_ + 2][0];
- list4 = listItems[_loc1_ + 3][0];
- list5 = listItems[_loc1_ + 4][0];
- list6 = listItems[_loc1_ + 5][0];
- list7 = listItems[_loc1_ + 6][0];
- list8 = listItems[_loc1_ + 7][0];
- showIndex = _loc1_;
- }
- function searchString(wanted)
- {
- var _loc2_ = wanted;
- _loc2_ = _loc2_.toUpperCase();
- var _loc1_ = 0;
- while(_loc1_ < listAmount)
- {
- listWord = listItems[_loc1_][0].toUpperCase();
- if(_loc2_ == listWord.substring(0,1))
- {
- location = _loc1_;
- updateListField(location);
- break;
- }
- updateListField(listAmount - 8);
- _loc1_ = _loc1_ + 1;
- }
- }
- itemsfile_loaded = 0;
- listItems = new Array();
- mainList = new Array();
- temp = new Array();
- temp2 = new Array();
- loader.play();
- if(_level0.external_call == true)
- {
- loadVariables("interface/glossary.txt",this.field);
- }
- else
- {
- loadVariables("../interface/glossary.txt",this.field);
- }
-